
from .api_register import ApiRegister

from flask import Flask, request, Blueprint

from . import app_register

@app_register.route('/register', methods=['GET', 'POST'])
    
def register():

    methods = request.method

    info = request.form

    company_name = info.get('company_name')

    linkman = info.get('linkman')

    phone = info.get('phone')

    need = info.get('need')

    party = info.get('party')

    openid = info.get('openid')

    with ApiRegister() as conn_api:

        result_info = conn_api.register(methods, company_name, linkman, phone, need, party, openid)

    return result_info
    

    